using System;
using System.Collections.Generic;
using System.Text;

using Google.GData.Client;
using Google.Documents;

namespace GDocBackupLib
{
    public abstract class DocumentRetriever
    {
        public readonly bool AUTO_PAGING = true;
        public readonly int PAGE_SIZE = 100;

        public abstract List<Document> GetDocumentsForUser(string username);
        public abstract List<Document> GetFoldersForUser(string username);
        protected abstract RequestSettings GetRequestSettings();
        public abstract DocumentsRequest GetDocumentsRequestForUser(string username);
        public abstract string[] GetUsers();

        public void AddFeedToList(Feed<Document> feed, List<Document> list)
        {
            foreach (Document entry in feed.Entries)
            {
                list.Add(entry);
            }
        }

        public List<Document> ConvertFeedToList(Feed<Document> feed)
        {
            List<Document> list = new List<Document>();
            foreach (Document entry in feed.Entries)
            {
                list.Add(entry);
            }
            return list;
        }

    }
}
